import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView  from '../views/HomeView.vue'
//import AboutView from '../views/AboutView.vue'
import MainView from '../views/MainView.vue'
import FileManager from '../views/FileManager.vue'
import LogisticsRouteManager from '../views/RouterManager'
import UserManager from '../views/UserManager'


const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: MainView,
    children: [
      {
        path: '/',
        name: 'main',
        component: MainView
      },
      {
        path: '/file-manager',
        name: 'file-manager',
        component: FileManager
      },
      {
        path: '/logistics-route-manager',
        name: 'logistics-route-manager',
        component: LogisticsRouteManager
      },
      {
        path: '/user-manager',
        name: 'user-manager',
        component: UserManager
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
